<% title_string = t("views.series.list.heading", series: @collection.slug) %>
<% description_string = t("views.series.meta.description", title: title_string, site: community_name) %>

<%= content_for :page_meta do %>
  <%= render "collections/meta", title_string: title_string, description_string: description_string, path: @collection.path %>
<% end %>

<main id="main-content" class="crayons-layout">
  <header class="px-2 m:px-0">
    <h1><%= title_string %></h1>
    <%= link_to t("views.series.list.back", user: @user.name), user_series_path(@user.username) %>
  </header>

  <div class="articles-list" id="articles-list">
    <div class="substories" id="substories">
      <% if @articles.present? %>
        <% @articles.each do |article| %>
          <%= render "articles/single_story", story: article.decorate, featured: article.main_image.present? %>
        <% end %>
        <%= javascript_include_tag "feedPreviewCards", "hideBookmarkButtons", "localizeArticleDates", defer: true %>
      <% else %>
        <p><%= t("views.series.list.empty") %></p>
      <% end %>
    </div>
  </div>
</main>
